package com.zzc.qqchat.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.ArrayList;


public interface GroupchatRep extends JpaRepository<GroupChat,Integer> {

    @Query(value = "select * from group_Message  where to=?1",nativeQuery = true)
    ArrayList<GroupChat> findBygroupId(int groupId);

    @Query(value = "select * from group_Message  where to=?1",nativeQuery = true)
    ArrayList<GroupChat> findByUserId(int groupId);
}
